<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/14
 * Time: 11:01
 */

include_once '../tools/common.php';
session_start();
$is_login = getLoginStatus();
if(!$is_login){
    echo '尚未登陆，<a href="loginUi.php">请先登录</a>';
    die;
}else{
    $token = $_COOKIE['Token'];
    setcookie('Token','',time()-3600,'/');
    unset($_SESSION[$token]);
    echo '退出成功，<a href="loginUi.php">请登录</a>';
}